/* 
    删除空白符
*/
export default function trim(str) {
    var returnStr = '';
    var flag = false;

    for (let index = 0; index < str.length; index++) {
        const element = str[index];

        if (element.match(/\s/) && !flag) {
            continue;
        }
        returnStr += element;

        if (element == '<') flag = true;
        if (element == '>') flag = false;
    }
    return returnStr;
}